<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- 
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License. 
-->
<html>
<head>
    <link type="text/css" rel="stylesheet" href="https://struts.apache.org/css/default.css">
    <style type="text/css">
        .dp-highlighter {
            width:95% !important;
        }
    </style>
    <style type="text/css">
        .footer {
            background-image:      url('https://cwiki.apache.org/confluence/images/border/border_bottom.gif');
            background-repeat:     repeat-x;
            background-position:   left top;
            padding-top:           4px;
            color:                 #666;
        }
    </style>
    <link href='https://struts.apache.org/highlighter/style/shCoreStruts.css' rel='stylesheet' type='text/css' />
    <link href='https://struts.apache.org/highlighter/style/shThemeStruts.css' rel='stylesheet' type='text/css' />
    <script src='https://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushPlain.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushXml.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushJava.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushJScript.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushGroovy.js' type='text/javascript'></script>
    <script src='https://struts.apache.org/highlighter/js/shBrushBash.js' type='text/javascript'></script>
    <script type="text/javascript">
        SyntaxHighlighter.defaults['toolbar'] = false;
        SyntaxHighlighter.all();
    </script>
    <script type="text/javascript" language="javascript">
        var hide = null;
        var show = null;
        var children = null;

        function init() {
            /* Search form initialization */
            var form = document.forms['search'];
            if (form != null) {
                form.elements['domains'].value = location.hostname;
                form.elements['sitesearch'].value = location.hostname;
            }

            /* Children initialization */
            hide = document.getElementById('hide');
            show = document.getElementById('show');
            children = document.all != null ?
                    document.all['children'] :
                    document.getElementById('children');
            if (children != null) {
                children.style.display = 'none';
                show.style.display = 'inline';
                hide.style.display = 'none';
            }
        }

        function showChildren() {
            children.style.display = 'block';
            show.style.display = 'none';
            hide.style.display = 'inline';
        }

        function hideChildren() {
            children.style.display = 'none';
            show.style.display = 'inline';
            hide.style.display = 'none';
        }
    </script>
    <title>Form Tags</title>
</head>
<body onload="init()">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
    <tr class="topBar">
        <td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
            &nbsp;<a href="home.html">Home</a>&nbsp;&gt;&nbsp;<a href="guides.html">Guides</a>&nbsp;&gt;&nbsp;<a href="tag-developers-guide.html">Tag Developers Guide</a>&nbsp;&gt;&nbsp;<a href="struts-tags.html">Struts Tags</a>&nbsp;&gt;&nbsp;<a href="ui-tags.html">UI Tags</a>&nbsp;&gt;&nbsp;<a href="form-tags.html">Form Tags</a>
        </td>
        <td align="right" valign="middle" nowrap>
            <form name="search" action="https://www.google.com/search" method="get">
                <input type="hidden" name="ie" value="UTF-8" />
                <input type="hidden" name="oe" value="UTF-8" />
                <input type="hidden" name="domains" value="" />
                <input type="hidden" name="sitesearch" value="" />
                <input type="text" name="q" maxlength="255" value="" />
                <input type="submit" name="btnG" value="Google Search" />
            </form>
        </td>
    </tr>
</table>

<div id="PageContent">
    <div class="pageheader" style="padding: 6px 0px 0px 0px;">
        <!-- We'll enable this once we figure out how to access (and save) the logo resource -->
        <!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
        <div style="margin: 0px 10px 0px 10px" class="smalltext">Apache Struts 2 Documentation</div>
        <div style="margin: 0px 10px 8px 10px"  class="pagetitle">Form Tags</div>

        <div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=14230">
                <img src="https://cwiki.apache.org/confluence/images/icons/notep_16.gif"
                     height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a>
            <a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=14230">Edit Page</a>
            &nbsp;
            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">
                <img src="https://cwiki.apache.org/confluence/images/icons/browse_space.gif"
                     height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a>
            <a href="https://cwiki.apache.org/confluence/pages/listpages.action?key=WW">Browse Space</a>
            &nbsp;
            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=14230">
                <img src="https://cwiki.apache.org/confluence/images/icons/add_page_16.gif"
                     height="16" width="16" border="0" align="absmiddle" title="Add Page"></a>
            <a href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=WW&fromPageId=14230">Add Page</a>
            &nbsp;
            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=14230">
                <img src="https://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif"
                     height="16" width="16" border="0" align="absmiddle" title="Add News"></a>
            <a href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=WW&fromPageId=14230">Add News</a>
        </div>
    </div>

    <div class="pagecontent">
        <div class="wiki-content">
            <div id="ConfluenceContent"><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Please make sure you have read the <a shape="rect" href="tag-syntax.html">Tag Syntax</a> document and understand how tag attribute syntax works.</p></div></div><p>Within the form tags, there are two classes of tags: the form tag itself, and all other tags, which make up the individual form elements. The behavior of the form tag is different than the elements enclosed within it.</p><h2 id="FormTags-FormTagThemes">Form Tag Themes</h2><p>As explained in <a shape="rect" href="themes-and-templates.html">Themes and Templates</a>, the HTML Tags (which includes Form Tags) are all driven by templates. Templates are grouped together to create themes. The framework bundles three themes in the distribution.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>simple</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Sometimes <em>too</em> simple</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>xhtml</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Extends simple</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>(default)</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>ajax</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>Extends xhtml</p></td></tr></tbody></table></div><p>The predefined themes can be used "as is" or customized.</p><div class="confluence-information-macro confluence-information-macro-tip"><p class="title">xhtml layout</p><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The xhtml theme renders out a two-column table. If a different layout is needed, do <em>not</em> write your own HTML. Create a new theme or utilize the simple theme.</p></div></div><h3 id="FormTags-Simplethemecaveats">Simple theme caveats</h3><p>The downside of using the simple theme is that it doesn't support as many of the attributes that the other themes do. For example, the <code>label</code> attribute does nothing in the simple theme, and the automatic display of error messages is not supported.</p><h2 id="FormTags-CommonAttributes">Common Attributes</h2><p>All the form tags extend the UIBean class. This base class provides a set of common attributes, that can be grouped in to three categories: <code>templated-related</code>, javascript-related, and general attributes. The individual attributes are documented on each tag's reference page.</p><p>In addition to the common attributes, a special attribute exists for all form element tags: <code>form</code> (${parameters.form}). The <code>form</code> property represents the attributes used to render the form tag, such as the form's id. In a template, the form's ID can be found by calling ${parameters.form.id}.</p><h2 id="FormTags-Template-RelatedAttributes">Template-Related Attributes</h2>
<p><table border="1" summary=""><thead><tr><td colspan="1" rowspan="1">Attribute</td><td colspan="1" rowspan="1">Theme</td><td colspan="1" rowspan="1">Data Types</td><td colspan="1" rowspan="1">Description</td></tr></thead><tbody><tr><td colspan="1" rowspan="1">templateDir</td><td colspan="1" rowspan="1">n/a</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">define the template directory</td></tr><tr><td colspan="1" rowspan="1">theme</td><td colspan="1" rowspan="1">n/a</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">define the theme name</td></tr><tr><td colspan="1" rowspan="1">template</td><td colspan="1" rowspan="1">n/a</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">define the template name</td></tr><tr><td colspan="1" rowspan="1">themeExpansionToken</td><td colspan="1" rowspan="1">n/a</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">special token (defined with struts.ui.theme.expansion.token) used to search for template in parent theme
         (don't use it separately!)</td></tr><tr><td colspan="1" rowspan="1">expandTheme</td><td colspan="1" rowspan="1">n/a</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">concatenation of themeExpansionToken and theme which tells internal template loader mechanism
         to try load template from current theme and then from parent theme (and parent theme, and so on)
         when used with &lt;#include/&gt; directive</td></tr></tbody></table></p>
<h2 id="FormTags-Javascript-RelatedAttributes">Javascript-Related Attributes</h2>
<p><table border="1" summary=""><thead><tr><td colspan="1" rowspan="1">Attribute</td><td colspan="1" rowspan="1">Theme</td><td colspan="1" rowspan="1">Data Types</td><td colspan="1" rowspan="1">Description</td></tr></thead><tbody><tr><td colspan="1" rowspan="1">onclick</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">html javascript onclick attribute</td></tr><tr><td colspan="1" rowspan="1">ondblclick</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">html javascript ondbclick attribute</td></tr><tr><td colspan="1" rowspan="1">onmousedown</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">html javascript onmousedown attribute</td></tr><tr><td colspan="1" rowspan="1">onmouseup</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">html javascript onmouseup attribute</td></tr><tr><td colspan="1" rowspan="1">onmouseover</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">html javascript onmouseover attribute</td></tr><tr><td colspan="1" rowspan="1">onmouseout</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">html javascript onmouseout attribute</td></tr><tr><td colspan="1" rowspan="1">onfocus</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">html javascript onfocus attribute</td></tr><tr><td colspan="1" rowspan="1">onblur</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">html javascript onblur attribute</td></tr><tr><td colspan="1" rowspan="1">onkeypress</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">html javascript onkeypress attribute</td></tr><tr><td colspan="1" rowspan="1">onkeyup</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">html javascript onkeyup attribute</td></tr><tr><td colspan="1" rowspan="1">onkeydown</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">html javascript onkeydown attribute</td></tr><tr><td colspan="1" rowspan="1">onselect</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">html javascript onselect attribute</td></tr><tr><td colspan="1" rowspan="1">onchange</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">html javascript onchange attribute</td></tr></tbody></table></p>
<h2 id="FormTags-TooltipRelatedAttributes">Tooltip Related Attributes</h2>
<p><table border="1" summary=""><tr><td colspan="1" rowspan="1">Attribute</td><td colspan="1" rowspan="1">Data Type</td><td colspan="1" rowspan="1">Default</td><td colspan="1" rowspan="1">Description</td></tr><tr><td colspan="1" rowspan="1">tooltip</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">none</td><td colspan="1" rowspan="1">Set the tooltip of this particular component</td></tr><tr><td colspan="1" rowspan="1">jsTooltipEnabled</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">false</td><td colspan="1" rowspan="1">Enable js tooltip rendering</td></tr><tr><td colspan="1" rowspan="1">tooltipIcon</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">/struts/static/tooltip/tooltip.gif</td><td colspan="1" rowspan="1">The url to the tooltip icon</td></tr><tr><td colspan="1" rowspan="1">tooltipDelay</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">500</td><td colspan="1" rowspan="1">Tooltip shows up after the specified timeout (miliseconds). A behavior similar to that of OS based tooltips.</td></tr><tr><td colspan="1" rowspan="1">key</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">The name of the property this input field represents.  This will auto populate the name, label, and value</td></tr></table></p>
<h2 id="FormTags-GeneralAttributes">General Attributes</h2>
<p><table border="1" summary=""><thead><tr><td colspan="1" rowspan="1">Attribute</td><td colspan="1" rowspan="1">Theme</td><td colspan="1" rowspan="1">Data Types</td><td colspan="1" rowspan="1">Description</td></tr></thead><tbody><tr><td colspan="1" rowspan="1">cssClass</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">define html class attribute</td></tr><tr><td colspan="1" rowspan="1">cssStyle</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">define html style attribute</td></tr><tr><td colspan="1" rowspan="1">cssClass</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">error class attribute</td></tr><tr><td colspan="1" rowspan="1">cssStyle</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">error style attribute</td></tr><tr><td colspan="1" rowspan="1">title</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">define html title attribute</td></tr><tr><td colspan="1" rowspan="1">disabled</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">define html disabled attribute</td></tr><tr><td colspan="1" rowspan="1">label</td><td colspan="1" rowspan="1">xhtml</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">define label of form element</td></tr><tr><td colspan="1" rowspan="1">labelPosition</td><td colspan="1" rowspan="1">xhtml</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">define label position of form element (top/left), default to left</td></tr><tr><td colspan="1" rowspan="1">requiredPosition</td><td colspan="1" rowspan="1">xhtml</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">define required label position of form element (left/right), default to right</td></tr><tr><td colspan="1" rowspan="1">errorPosition</td><td colspan="1" rowspan="1">xhtml</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">define error position of form element (top|bottom), default to top</td></tr><tr><td colspan="1" rowspan="1">name</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">Form Element's field name mapping</td></tr><tr><td colspan="1" rowspan="1">required</td><td colspan="1" rowspan="1">xhtml</td><td colspan="1" rowspan="1">Boolean</td><td colspan="1" rowspan="1">add * to label (true to add false otherwise)</td></tr><tr><td colspan="1" rowspan="1">tabIndex</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">String</td><td colspan="1" rowspan="1">define html tabindex attribute</td></tr><tr><td colspan="1" rowspan="1">value</td><td colspan="1" rowspan="1">simple</td><td colspan="1" rowspan="1">Object</td><td colspan="1" rowspan="1">define value of form element</td></tr></tbody></table></p>
<div class="confluence-information-macro confluence-information-macro-note"><p class="title">When some attributes don't apply</p><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Some tag attributes may not be utilized by all, or any, of the templates. For example, the form tag supports the <code>tabindex</code> attribute, but none of the themes render the <code>tabindex</code>.</p></div></div><h2 id="FormTags-Value/NameRelationship">Value/Name Relationship</h2><p>In many of the tags (except for the form tag) there is a unique relationship between the <code>name</code> and <code>value</code> attributes. The <code>name</code> attribute provides the name for the tag, which in turn is used as the control attribute when the form is submitted. The value submitted is bound to the <code>name</code>. In most cases, the <code>name</code> maps to a simple JavaBean property, such as "postalCode". On a submit, the value would be set to the property by calling the <code>setPostalCode</code> mutator.</p><p>Likewise, a form control could be populated by calling a JavaBean accessor, like <code>getPostalCode</code>. In the expression language, we can refer to the JavaBean property by name. An expression like "%{postalCode}" would in turn call <code>getPostalCode</code>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Using Expressions to populate a form for editing</b></div><div class="codeContent panelContent pdl">
<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;@s.form action="updateAddress"&gt;
    &lt;@s.textfield label="Postal Code" name="postalCode" value="%{postalCode}"/&gt;
    ...
&lt;/@s.form&gt;
</pre>
</div></div><p>However, since the tags imply a relationship between the <code>name</code> and <code>value</code>, the <code>value</code> attribute is optional. If a <code>value</code> is not specified, by default, the JavaBean accessor is used instead.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Populating a form for editing, the easy way</b></div><div class="codeContent panelContent pdl">
<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;@s.form action="updateAddress"&gt;
    &lt;@s.textfield label="Postal Code" name="postalCode"/&gt;
    ...
&lt;/@s.form&gt;
</pre>
</div></div><p>While most attributes are exposed to the underlying templates as the same key as the attribute (${parameters.label}), the <code>value</code> attribute is not. Instead, it can be accessed via the <code>nameValue</code> key (${parameters.nameValue}). The <code>nameValue</code> key indicates that the value may have been generated from the <code>name</code> attribute rather than explicitly defined in the <code>value</code> attribute.</p><h2 id="FormTags-IDNameAssignment">ID Name Assignment</h2><p>All form tags automatically assign an ID to the control, but the ID can be overridden if needed.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Forms</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>The default ID is the action name. For example, "updateAddress".</p></td></tr><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Controls</p></th><td colspan="1" rowspan="1" class="confluenceTd"><p>The default ID is the form's name concatenated with the tag name. For example, "updateAddress_postalCode".</p></td></tr></tbody></table></div><h2 id="FormTags-Formlabelpositionpropagation">Form labelposition propagation</h2><p>When&#160;<code>labelposition</code> attribute was defined for&#160;<code>&lt;s:form&gt;</code> tag it will be propagated to all form elements, but if form element defines its own&#160;<code>labelposition</code> it will take precedence over&#160;<code>&lt;s:form&gt;</code>'s attribute. Since 2.3.17.</p><h2 id="FormTags-RequiredAttribute">Required Attribute</h2><p>The <code>required</code> attribute on many UI tags defaults to true only if you have client-side validation enabled, and a validator is associated with that particular field.</p><h2 id="FormTags-Tooltip">Tooltip</h2><p></p><p>
<b>tooltipConfig is deprecated, use individual tooltip configuration attributes instead </b>
</p>

<p></p><p>
Every Form UI component (in xhtml / css_xhtml or any other that extends them) can
have tooltips assigned to them. The Form component's tooltip related attribute, once
defined, will be applied to all form UI components that are created under it unless
explicitly overridden by having the Form UI component itself defined with their own tooltip attribute.
</p>

<p></p><p>
In Example 1, the textfield will inherit the tooltipDelay and tooltipIconPath attribute from
its containing form. In other words, although it doesn't define a tooltipIconPath
attribute, it will have that attribute inherited from its containing form.
</p>

<p></p><p>
In Example 2, the  textfield will inherit both the tooltipDelay and
tooltipIconPath attribute from its containing form, but the tooltipDelay
attribute is overridden at the textfield itself. Hence, the textfield actually will
have its tooltipIcon defined as /myImages/myIcon.gif, inherited from its containing form, and
tooltipDelay defined as 5000.
</p>

<p></p><p>
Example 3, 4 and 5 show different ways of setting the tooltip configuration attribute.<br clear="none">
<b>Example 3:</b> Set tooltip config through the body of the param tag<br clear="none">
<b>Example 4:</b> Set tooltip config through the value attribute of the param tag<br clear="none">
<b>Example 5:</b> Set tooltip config through the tooltip attributes of the component tag<br clear="none">
</p>
<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[

&lt;!-- Example 1: --&gt;
&lt;s:form
         tooltipDelay=&quot;500&quot;
         tooltipIconPath=&quot;/myImages/myIcon.gif&quot; .... &gt;
  ....
    &lt;s:textfield label=&quot;Customer Name&quot; tooltip=&quot;Enter the customer name&quot; .... /&gt;
  ....
&lt;/s:form&gt;

&lt;!-- Example 2: --&gt;
&lt;s:form
         tooltipDelay=&quot;500&quot;
         tooltipIconPath=&quot;/myImages/myIcon.gif&quot; .... &gt;
  ....
    &lt;s:textfield label=&quot;Address&quot;
         tooltip=&quot;Enter your address&quot;
         tooltipDelay=&quot;5000&quot; /&gt;
  ....
&lt;/s:form&gt;


&lt;-- Example 3: --&gt;
&lt;s:textfield
       label=&quot;Customer Name&quot;
       tooltip=&quot;One of our customer Details&quot;&gt;
       &lt;s:param name=&quot;tooltipDelay&quot;&gt;
            500
       &lt;/s:param&gt;
       &lt;s:param name=&quot;tooltipIconPath&quot;&gt;
            /myImages/myIcon.gif
       &lt;/s:param&gt;
&lt;/s:textfield&gt;


&lt;-- Example 4: --&gt;
&lt;s:textfield
         label=&quot;Customer Address&quot;
         tooltip=&quot;Enter The Customer Address&quot; &gt;
         &lt;s:param
             name=&quot;tooltipDelay&quot;
             value=&quot;500&quot; /&gt;
&lt;/s:textfield&gt;


&lt;-- Example 5: --&gt;
&lt;s:textfield
         label=&quot;Customer Telephone Number&quot;
         tooltip=&quot;Enter customer Telephone Number&quot;
         tooltipDelay=&quot;500&quot;
         tooltipIconPath=&quot;/myImages/myIcon.gif&quot; /&gt;

]]></script>
</div></div><h2 id="FormTags-Next:">Next: <a shape="rect" href="ui-tag-reference.html">UI Tag Reference</a></h2></div>
        </div>

        
    </div>
</div>
<div class="footer">
    Generated by CXF SiteExporter
</div>
</body>
</html>
